#!/usr/bin/python3
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-

import os
from common_python import die, check_package_installed


check_package_installed({
    "gentoo": [
        "sys-devel/binutils-config",
    ],
})

chost = os.listdir("/usr/lib64/binutils")
if len(chost) != 1:
    die("Failed to determine CHOST.")
chost = chost[0]

print("/etc/env.d/05binutils")
print("/etc/env.d/binutils/config-%s" % (chost))

print("/usr/bin/addr2line")
print("/usr/bin/ar")
print("/usr/bin/as")
print("/usr/bin/c++filt")
print("/usr/bin/dwp")
print("/usr/bin/elfedit")
print("/usr/bin/gprof")
print("/usr/bin/ld")
print("/usr/bin/ld.bfd")
print("/usr/bin/ld.gold")
print("/usr/bin/nm")
print("/usr/bin/objcopy")
print("/usr/bin/objdump")
print("/usr/bin/ranlib")
print("/usr/bin/readelf")
print("/usr/bin/size")
print("/usr/bin/strings")
print("/usr/bin/strip")

print("/usr/bin/%s-addr2line" % (chost))
print("/usr/bin/%s-ar" % (chost))
print("/usr/bin/%s-as" % (chost))
print("/usr/bin/%s-c++filt" % (chost))
print("/usr/bin/%s-dwp" % (chost))
print("/usr/bin/%s-elfedit" % (chost))
print("/usr/bin/%s-gprof" % (chost))
print("/usr/bin/%s-ld" % (chost))
print("/usr/bin/%s-ld.bfd" % (chost))
print("/usr/bin/%s-ld.gold" % (chost))
print("/usr/bin/%s-nm" % (chost))
print("/usr/bin/%s-objcopy" % (chost))
print("/usr/bin/%s-objdump" % (chost))
print("/usr/bin/%s-ranlib" % (chost))
print("/usr/bin/%s-readelf" % (chost))
print("/usr/bin/%s-size" % (chost))
print("/usr/bin/%s-strings" % (chost))
print("/usr/bin/%s-strip" % (chost))

print("/usr/%s/bin/***" % (chost))
print("/usr/%s/lib/***" % (chost))
